﻿using BDShop.DAL;
using BDShop.Entities;
using System;
using System.Collections.Generic;
using IsolationLevel = System.Transactions.IsolationLevel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BDShop.Business
{
    public class MemberShipService
    {
        public static webpages_Membership VerificationToken(int ID, string token)
        {
            webpages_Membership memberShip = new webpages_Membership();
            using (var context = new BDShopEntities(IsolationLevel.ReadUncommitted))
            {
                memberShip = context.WebpagesMemberships.Where(ms => ms.UserId==ID && ms.PasswordVerificationToken==token).Single();
            }

            return memberShip;
        }
    }
}
